package sqlsession;

import config.Configuration;
import parse.ConfigMapperParse;

import java.io.InputStream;

/**
 * @CreatedBy richInfo AI
 * @ClassName SqlSessionFactoryBuilder
 * @Date 2021/8/16 2:17 下午
 * @Author xin.yang
 * @Description TODO
 */
public class SqlSessionFactoryBuilder
{

    public  SqlSessionFactory build(InputStream in)throws Exception
    {
        ConfigMapperParse configMapperParse = new ConfigMapperParse();
        Configuration configuration = configMapperParse.parse(in);
        return new DefaultSqlSessionFactory(configuration);
    }

}
